home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
utility
/
540
/
rend512
/
rend512.doc
next >
Wrap
Text File
|
1990-12-31
|
16KB
|
379 lines
RENDER 512 v1.0
Copyright (c) 1991 J. C. Stanford
RENDER 512 v1.0 is a FREEWARE program. A FREEWARE program
is one which you may freely distribute, but you cannot charge for
it or alter the program or contents of the documentation in any
manner.
==================================================================
RENDER 512 is similar to CAD-3D 2.0 in that it takes CAD-3D *.3D2
object files and displays them on the screen as solid objects.
However RENDER 512 adds a few additional features:
o Rounded objects are drawn with smooth shading across their
surface. No more polygon edges.
o Objects may be drawn with highlights.
o Objects may cast shadows on other objects.
o Rendered pictures are created and saved in SPECTRUM 512 format.
NO MORE 16 COLOR LIMIT!!
o Number of objects and lightsources is limited only by memory.
o Every object may have its own individual color palette. It is
possible to have 80 objects, each a different color!
CAD-3D v2.x or Cyber Sculpt are required to create objects.
==================================================================
COMPATIBILITY
This program should work on all standard Atari ST models with
color monitor and 1 meg or more memory. Compatibility with the TT
is not confirmed, but is not expected. Compatibility with modified
ST's featuring accelerators or overscan is dubious. If Spectrum
512 works on your computer, then RENDER 512 should also.
==================================================================
RUNNING THE PROGRAM
To run the program first ensure that REND512.PRG, REND512.RSC, and
SHOW512.0 are located in the same directory. RENDER 512 must be
run from medium resolution. Then run REND512.PRG.
==================================================================
BRIEF TUTORIAL
Once the program has loaded the camera and rendering screen is
displayed. The white box in the center of the screen is where
loaded objects are displayed. The slider bars below and to the
right control the camera viewpoint. The three buttons in the upper
right corner allow editing the object and lightsource attributes.
The remaining buttons on the right select the rendering style. The
menubar allows access to desk accessories and options to load and
save files.
To load a group of objects which have been created with CAD-3D or
Cyber Sculpt select LOAD .3D2 from the FILE drop down menu. When
the item selector comes up select the file you wish to load.
Information about the objects will be displayed as loading
progresses, and when completed the objects will be displayed in
the view window.
The position from which the objects are viewed may be changed with
the camera controls, which consist of a horizontal angle slider
bar, a vertical angle slider bar, and a zoom slider bar. The
horizontal angle rotates the camera left and right around the
center of the object universe. The vertical angle rotates the
camera up and down around the viewpoint center. Zoom increases and
decreases the image's magnification, with 999 the greatest and 0
the smallest magnification. The slider bars may be adjusted just
like the bars in a normal GEM window. Once the camera has been
adjusted to the desired position clicking the mouse in the view
window will redraw the objects from the new camera location.
There are three different rendering options. GOURAUD, PHONG, and
PHONG with SHADOWS. These are selected with the three buttons on
the right. All three options will draw the loaded objects in Solid
mode with smooth shading, from the same camera position as shown
in the view window.
Gouraud shading is the quickest rendering option. It will draw the
objects with smooth shading, but the shading may rough and uneven.
It is best used for testing what the final image will look like.
Phong shading is a much more accurate shading routine and provides
a much better image, but takes alot more time. It also produces
images with specular highlights. Specular highlight is the term
used for the glare reflected off an object from a lightsource.
Phong with shadows is identical to the above option, but objects
cast shadows on each other.
Clicking the mouse on the desired option will select it and
deselect the others. Clicking on the RENDER IT button will then
begin the object rendering process. If Gouraud or Phong shading is
selected the screen will blank and the image will begin drawing
line by line from top to bottom. Don't be alarmed that the image
looks terrible, this is due to the manner in which Spectrum 512
images are stored. To get a better look at the image press the
space bar. After a moment the screen will go blank and the image
will be properly displayed. Pressing the spacebar again will
resume drawing. This again may take a couple moments. If you
decide you don't like how the current image is turning out
pressing the UNDO key will stop the rendering and return you to
the main screen. Once the image has completed drawing it will be
displayed in Spectrum format. Press the RETURN key to exit to the
main screen.
Phong with Shadows works a little different. When RENDER IT is
selected a shadow pre-processing phase is entered. This phase
examines the objects to see which ones may cast and receive
shadows. The objects are displayed from the viewpoint of the
lightsource and green boxes are drawn to show the pre-processing.
This is repeated for each lightsource. Once the pre-processing
phase is complete rendering continues as in Gouraud and Phong
shading.
Once an image has been rendered it may be saved as a *.SPC file
for later viewing. From the main screen select SAVE .SPC from the
FILE menu. The file selector will appear for you to select the
file name to save it as.
To exit RENDER 512 select quit from the FILE menu.
=================================================================
FILE MENU
---------
Items under the file menu allow the loading and saving of files,
and exiting RENDER 512.
LOAD .3D2 :
Selecting this option loads a *.3D2 object file created with CAD-
3D v2.0 or Cyber Sculpt. All objects in the file are loaded, the
ambient light level is set, and three RENDER 512 lightsources are
created matching those in the file. Selecting this option will
erase any objects and lights currently in memory.
MERGE .3D2:
This option is similar to LOAD .3D2 except the objects currently
in memory are not erased. The current lightsources and ambient
level are retained and the new lights are discarded.
LOAD .RD1:
This loads a *.RD1 3-d object file and erases any objects
currently in memory. *.RD1 files are similar to CAD-3D's *.3D2
files, but are used only by RENDER 512 and contain additional
information about object attributes and additional lightsources.
SAVE .RD1:
Selecting this saves a *.RD1 file to disk. This file will contain
all objects and lightsources currently in memory, along with any
modified object color palettes.
SAVE .SPC:
This option saves a rendered image in Spectrum 512 compressed
format for viewing outside RENDER 512. This option may not be
selected if no images have been rendered.
QUIT:
Exits RENDER 512. All objects in memory will be lost.
DEFAULTS
--------
Clicking on the DEFAULTS button brings up a dialog box which
allows changing the rendering parameters which will be assigned to
any future CAD-3D objects which are loaded.
OBJECT RESOLUTION:
This variable is used by the shadow pre-processing phase to ensure
that no shadows are missed on the edges of objects. It specifies
how many faces there are around one circumference of a round
object. If rendering objects with shadows which have a very coarse
polygon resolution this number should be decreased.
SPECULAR PERCENTAGE:
This variable sets the intensity of the specular highlights. 100%
provides full highlight intensity, while 0% would not display any
highlights.
SPECULAR COEFFICIENT:
This variable controls how large the highlights are. The larger
the number, the smaller the highlight area.
BREAK POINT:
This sets the angle between faces below which the faces are smooth
shaded, allowing cubes and other blocky objects to retain their
unique edges. At 90 deg everything but a cube would be rounded. At
0 deg none of the objects would be smooth shaded.
SHADOW OPTIMIZATION DEPTH:
This variable controls how closely the object space is examined
for possible shadow intersections in the shadow pre-processing
phase. Higher depths can save memory and rendering time, but at
the cost of a much longer pre-processing phase. The optimal value
varies from scene to scene based on object and lightsource
placement, but the default value is usually adequate.
OBJECT EDIT
-----------
Clicking on the OBJECTS button allows editing each object's
attributes. This option is not selectable if no objects are in
memory.
The directory on the right shows all objects in memory, and the
corresponding number of vertices and faces. The list may be
scrolled up and down using the scroll bar.
The visibility of an object may be turned on or off by clicking on
the corresponding SHOW/HIDE word in the directory.
To edit an object click on the object's name in the directory. The
object's current attributes will appear on the right. An object's
name may have up to 16 characters, and multiple objects may have
the same name. The rendering attributes previously discussed in
the defaults section may be individually set for each object.
Selecting another object to edit or selecting EXIT will save any
modifications made.
Each object has its own color palette, which is initially set to
the one saved by CAD-3D. RENDER 512 performs its own shading and
does not use the shading groups of CAD-3D. Each object may have
its own unique set of 16 colors. However, one can-not recolor
individual faces at will from within RENDER 512. (Get 3-D Object
Colorizer v1.0, CEDIT3D.LZH on Genie. Another adequate piece of
software from John Stanford.) You are limited to the number of
different colors the object was created with. In other words, you
can change every face which was colored blue to red, et cettera,
but all faces which are the same color number will all change at
the same time. That said, here's how to do it. The right side of
the screen contains a grid of 16 boxes, most of which will
probably be shaded out. Clicking on one of the unshaded boxes will
enter the color dialog for that color number. The slider bars are
used to mix the red, green, and blue components for the new color.
Any face which was colored with that color number will be changed
to the new color.
LIGHTSOURCE EDIT
----------------
Clicking on the LIGHTS button allows editing the individual
lightsources. RENDER 512 permits up to 21 lightsources. The lights
are set up a little differently from CAD-3D. RENDER 512 does not
allow lightsources located within the object space as CAD-3D does.
Each light has a horizontal and vertical angle, identical to the
camera. These angles specify the location of the lightsource. If
this is confusing, just think of the light as the view camera set
at the specified angle. Setting the camera at that angle will
place the camera at the same location as the lightsource, looking
from the lightsource to the viewcenter.
The lighting intensity is also different from CAD-3D, ranging from
0 to 100 instead of 0 to 7. To change the position or intensity of
a lightsource use the cursor keys or the mouse to move to the
desired entry and type in the new value. Lightsources may be
turned on of off by clicking on the corresponding ON/OFF entry.
Clicking on the ADD button adds another lightsource to the bottom
of the list. To delete a light, click on the number of the desired
light to highlight it, the select DELETE.
The ambient light intensity is shown in the upper right. The
ambient light is a non-directional light which illuminates all
object faces evenly. It is always on, but may be effectively
turned off by setting the intensity to 0.
SETTING THE VIEWPOINT (CAMERA)
------------------------------
The camera location may be set in two ways, by direct entry or
with the slider bars.
To directly enter the camera location click on the box in the
lower left corner labeled VIEWPOINT which shows the current camera
position. This opens a dialog box from which the new camera angles
may be entered.
The slider bars work similarly to those in CAD-3D, and are
functionally identical to standard window slider bars. The actual
image in the view window will not change until the mouse is
clicked within the view window. There is a boxed letter V to the
right of the horizontal slider. This box will be highlighted if
the camera position has been changed since the image was updated.
The image in the view window is drawn with all back-facing
polygons removed, i.e. any object face which would not be visible
from the viewpoint.
RENDERING
---------
This subject was effectively covered in the tutorial. Images will
always be rendered from the current camera viewpoint, irregardless
of the camera position from which the view window was last drawn.
=================================================================
MEMORY CONSIDERATIONS
---------------------
RENDER 512 uses ALOT of memory! It is quite possible to run out of
memory in the middle of rendering an image or even at the very
end. Due to the nature of the rendering algorithm it is impossible
to predict a scene's memory requirements prior to rendering as it
varies based on object and lightsource positioning.
If RENDER 512 runs out of memory while loading a file the load
will be truncated at the last completed object. RENDER 512
attempts to optimize the storage requirements of each object, so
that when initially loading a CAD-3D *.3D2 object it may use
considerably more memory than the final optimized object will. If
you are loading a 3D2 file with several objects and run out of
memory, try resaving the file from CAD-3D in several parts,
loading the largest objects first. This will sometimes allow you
to load the whole file.
Rendering with shadows consumes alot more memory than rendering
without, and this increases with each lightsource. A compromise
had to be made between shadow rendering time and memory
conservation, and the rendering time won.
================================================================
ENJOY!!!!
Any and all comments, ideas, and criticisms are welcome!
I can be reached on GENIE as J.STANFORD2 or on the Dugout BBS in
Kansas City (816) 373-9589.
John C. Stanford
7-28-91
==================================================================
==================================================================
AND WATCH FOR *** RENDER 512 V2.0 *****
COMING EVENTUALLY TO A GENIE FILE LIBRARY NEAR YOU!!
With new and fascinating features!
o More lightsource types! Lights within the object space.
Spotlights.
o Texture and environment mapping.
o Extensive animation capablities.
o More stuff I haven't thought of yet!
COMING SOMEDAY!!!
=====================================================================
Spectrum 512, CAD-3D, and Cyber Sculpt are trademarks of Antic
Software.
=====================================================================
====================================================================
This program is supplied in the belief that it operates as specified,
the author shall not be liable in any circumstance whatsoever for any
direct or indirect loss or damage to property incurred or suffered by
the customer or any other person as a result of any fault or defect
in the goods or services supplied by the author and in no
circumstances shall the author be liable against consequential
damage or loss of profits (whether or not the possibility thereof was
separately advised to it or reasonably forseeable) arising from the
use or performance of such goods or services.